// src/routers/routesConfig.ts
import React from 'react';
import { Navigate } from 'react-router-dom';
import Home from '../pages/index';
import AccountRoutes from './testPlatform';
import ToolKitRoutes from './ToolKit';
import FortuneRoutes from './Fortune';
import SignUp from '../components/Admin/sign/signUp';
import SignInPage from '../components/Admin/sign/generalSignIn';
import ForgotPasswordPage from '../components/Admin/ForgotPassword';
import { RouteConfig } from '../types/router.types';

// 路由配置
export const routes: RouteConfig[] = [
  { path: "/", element: React.createElement(Navigate, { to: "/home", replace: true }), protected: false },
  { path: "/home", element: React.createElement(Home), protected: false },
  { path: "/register", element: React.createElement(SignUp), protected: false },
  { path: "/login", element: React.createElement(SignInPage), protected: false },
  { path: "/forgotPassword", element: React.createElement(ForgotPasswordPage), protected: false },
  ...AccountRoutes,
  ...ToolKitRoutes,
  ...FortuneRoutes,
  { path: "*", element: React.createElement("div", null, "404 Page Not Found"), protected: false },
];
